package com.cjfather.redis.steam.websocket;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import lombok.extern.slf4j.Slf4j;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;


@Slf4j
@Component
public class GoodsOrderTask {
	
	@Scheduled(fixedRate = 15000)
    public void doTask() {
        try {
            System.out.println(LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")) + "：发送消息");
            WebSocketServerOne.sendInfo("9999999");
        } catch (Exception e) {
            log.error("系统出错:{}", e);
        }
 
    }

}
